{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js,validator.js"}
<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="main-div">
<form method="post" action="store.php" name="theForm" onsubmit="return validate()" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="3" width="100%">
  <tr>
    <td align="right">{$lang.address}</td>
    <td><input type="text" value="{$store.address}" name="address" size="30" /></td>
  </tr>
  <tr>
    <td align="right">{$lang.storeName}</td>
    <td><input type="text" value="{$store.storeName}" name="storeName" size="30" /></td>
  </tr>
  <tr>
    <td align="right">{$lang.tel}</td>
    <td><input type="text" value="{$store.tel}" name="tel" size="30" /></td>
  </tr>
  <tr>
    <td align="right">{$lang.longitude}</td>
    <td><input type="text" value="{$store.longitude}" name="longitude" size="30" /></td>
  </tr>
  <tr>
    <td align="right">{$lang.latitude}</td>
    <td><input type="text" value="{$store.latitude}" name="latitude" size="30" /></td>
  </tr>
  <tr>
    <td align="right">{$lang.star}</td>
    <td><input type="text" value="{$store.star}" id="star" name="star" size="30"  /></td>
  </tr>
  <tr>
  	<td align="right">{$lang.img}</td>
  	<td>
    <input type="file" name="dirPath" size="30" />
    {if $store.img}
	 <a href="/chunle{$store.img}" target="_blank">
      <img src="/chunle{$store.img}" border="0"  style="width:40px;" />
	  </a>
    {else}
      <img src="images/no.gif" />
    {/if}
	</td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" value="{$lang.button_submit}" class="button" />
      <input type="reset" value="{$lang.button_reset}" class="button" />
      <input type="hidden" name="act" value="{$form_action}" />
      <input type="hidden" name="id" value="{$store.id}" />
    </td>
  </tr>
</table>
</form>
</div>
<script language="JavaScript">
<!--
{literal}
var display_yes = (Browser.isIE) ? 'block' : 'table-row-group';
/**
 * 检查表单输入的数据
 */
function validate()
{
  validator = new Validator("theForm");
  
  validator.isNullOption("storeName", no_storeName);
  validator.isNullOption("longitude", no_longitude);
  validator.isNullOption("latitude", no_longitude);
  validator.isNumber("star", no_star);
  validator.required("star", no_star);
  	if(0<document.getElementById("star").value&&document.getElementById("star").value<=5){
	}else{alert("请输入1-5数字");return false;}
  return validator.passed();
}



function change_good_products()
{
  var filter = new Object;
  filter.goods_id = document.forms['theForm'].elements['goods_id'].value;

  Ajax.call('yyg.php?is_ajax=1&act=search_products', filter, searchProductsResponse, 'GET', 'JSON');
}

//-->
{/literal}
</script>
{include file="pagefooter.htm"}